package com.ssy.lingxi.report.model.constant.enhance;

/**
 * 生产通知单内部状态 - enum
 * @author fhj
 * @date 2020/6/2
 * @version 2.0.0
 */
public enum PNOInnerStatusEnum {

    TO_BE_SUPPLIER_SUBMIT_EXAM(1, "待提交审核"),
    TO_BE_SUPPLIER_EXAM1(2, "待审核(一级)"),
    TO_BE_SUPPLIER_EXAM2(3, "待审核(二级)"),
    TO_BE_SUPPLIER_SUBMIT(4, "待提交"),
    TO_BE_PROCESS_SUBMIT_EXAM(5, "待提交审核"),
    TO_BE_PROCESS_EXAM1(6, "待审核(一级)"),
    TO_BE_PROCESS_EXAM2(7, "待审核(二级)"),
    TO_BE_PROCESS_CONFIRM(8, "待确认"),
    PROCESS_ACCEPTED(9, "接受申请通知单"),
    TO_BE_PROCESS_ADD_DELIVERY(10, "待新增加工发货单"),
    TO_BE_PROCESS_EXAM_DELIVERY(11, "待审核加工发货单"),
    TO_BE_PROCESS_ADD_LOGISTICS(12, "待新增物流单"),
    TO_BE_PROCESS_CONFIRM_LOGISTICS(13, "待确认物流单"),
    TO_BE_PROCESS_CONFIRM_DELIVERY(14, "待确认发货"),
    TO_BE_SUPPLIER_ADD_STORAGE(15, "待新增加工入库单"),
    TO_BE_SUPPLIER_EXAM_STORAGE(16, "待审核加工入库单"),
    TO_BE_SUPPLIER_CONFIRM_RECEIVE(17, "待确认收货"),
    TO_BE_PROCESS_CONFIRM_RECEIPT(18, "待确认回单"),
    COMPLETE(19, "完成"),
    SUPPLIER_NOT_PASSED1(21, "审核不通过（一级）"),
    SUPPLIER_NOT_PASSED2(22, "审核不通过（二级）"),
    PROCESS_SUBMIT_NOT_PASSED(23, "提交审核不通过"),
    PROCESS_NOT_PASSED1(24, "审核不通过（一级）"),
    PROCESS_NOT_PASSED2(25, "审核不通过（二级）"),
    PROCESS_NOT_ACCEPTED(26, "不接受申请通知单"),
    NOT_ACCEPTED_LOGISTICS(27, "不接受物流单"),
    DISCONTINUE(28, "中止");

    private final Integer code;
    private final String message;

    PNOInnerStatusEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public static String getMessage(Integer code) {
        for (PNOInnerStatusEnum e : PNOInnerStatusEnum.values()) {
            if (e.getCode().equals(code)) {
                return e.getMessage();
            }
        }
        return "未知";
    }

    public Integer getCode() {
        return code;
    }


    public String getMessage() {
        return message;
    }

}
